package com.ruoyi.common.core.exception;


import com.ruoyi.common.core.constant.HttpStatusEnum;
import lombok.Getter;

/**
 * 自定义业务异常
 */
@Getter
public class BizException extends RuntimeException {

    private Integer status;

    public BizException(HttpStatusEnum httpStatusEnum) {
        super(httpStatusEnum.getMsg());
        this.status = httpStatusEnum.getStatus();
    }

    public BizException(Integer status, String message) {
        super(message);
        this.status = status;
    }

    public BizException(String message) {
        super(message);
    }

}
